﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Kira.Compiler.Bods
{
    public abstract class BodsTransform : BodsElementBase
    {
        public abstract IEnumerable<String> InputNames { get; }
        public abstract IEnumerable<String> OutputNames { get; }

        protected String GetComments(string header)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("--").Append(header).Append(" (")
                .Append(InputNames.Count() == 0 ? String.Empty : InputNames.Aggregate((a, b) => a + ", " + b))
                .Append(") -> (")
                .Append(OutputNames.Count() == 0 ? String.Empty : OutputNames.Aggregate((a, b) => a + ", " + b)).AppendLine(")");
            return sb.ToString();
        }
    }
}
